/*
 * @Author: lixinke 530822237@qq.com
 * @Date: 2022-08-16 16:08:29
 * @LastEditors: lixinke 530822237@qq.com
 * @LastEditTime: 2022-08-17 13:43:42
 * @FilePath: \新建文件夹 (3)\crm_customer\src\components\Ordermanage\Modal\Modal.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React ,{ useState } from 'react';
import { Input,Table } from 'antd';
import './Addmodal.css';
import Heighsearch from '../HeighSearch/HeighSearch';


const onSearch = (value) => console.log(value);
const { Search } = Input;
const columns = [
  {
    title: '客户名称',
    dataIndex: 'name',
    align: 'center',
    className: "bgColor",
    render: (text) => <a>{text}</a>,
  },
  {
    title: '客户类型',
    dataIndex: 'type',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '联系人',
    dataIndex: 'contact',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '手机号码',
    dataIndex: 'phone',
    align: 'center',
    className: "bgColor",
  },
  {
    title: 'QQ',
    dataIndex: 'qq',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '录入时间',
    dataIndex: 'time',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '最后更新',
    dataIndex: 'recompalta',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '合同总金额',
    dataIndex: 'allmoney',
    align: 'center',
    className: "bgColor",
  },
  {
    title: '业务员',
    dataIndex: 'salaman',
    align: 'center',
    className: "bgColor",
  }
];
const data = [
  {
  key: '1',
  name:"王德福",
  type:'重点',
  contact:'8888888',
  phone:'18888888888',
  QQ:'666666',
  time:'2021-12-13',
  recompalta:'3天前',
  allmoney:'88888',
  salaman:'二驴'
  },
  {
    key: '2',
    name:"王德福",
    type:'重点',
    contact:'8888888',
    phone:'18888888888',
    QQ:'666666',
    time:'2021-12-13',
    recompalta:'3天前',
    allmoney:'88888',
    salaman:'二驴'
  },
  {
    key: '3',
    name:"王德福",
    type:'重点',
    contact:'8888888',
    phone:'18888888888',
    QQ:'666666',
    time:'2021-12-13',
    recompalta:'3天前',
    allmoney:'88888',
    salaman:'二驴'
  },
  
]
export default function Addmodal() {

    const [classshow, setclassshow] = useState(true);
    function show() {
    console.log(classshow);
    setclassshow(!classshow);
  }
  
  return (
    <div className='addModal'>
      <div className='Searchbg'>
      <Search className='topsearch' placeholder="客户名称、联系人、手机号码" onSearch={onSearch} enterButton="立即搜索" />
    </div>
    <div><button onClick={show} className='heightsearch'>展开高级搜索</button></div>
    <div>
      <div>
        <span>↓↓ 单击以下表格行即可选中客户 ↓↓</span>
        <button>新增客户</button>
      </div>
    </div>
    <div className={classshow ? "showoff" : "showon"}>
            <Heighsearch/>
    </div>
    <Table 
    columns={columns}
    dataSource={data}
    pagination={true}
    bordered
  />
    
    </div>
  )
}






